<html>
<head><meta charset="utf-8"><title>caching cycles #60010 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html">caching cycles #60010</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164634204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/caching%20cycles%20%2360010/near/164634204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html#164634204">(May 01 2019 at 16:00)</a>:</h4>
<p>so over in <a class="stream" data-stream-id="131828" href="/#narrow/stream/131828-t-compiler">#t-compiler</a>, I <a href="#narrow/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010/near/164634040" title="#narrow/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010/near/164634040">noted a problem</a> with the way that we are caching things in our current trait evaluator</p>



<a name="164634211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/caching%20cycles%20%2360010/near/164634211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html#164634211">(May 01 2019 at 16:00)</a>:</h4>
<p>the problem has to do with cycles</p>



<a name="164634235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/caching%20cycles%20%2360010/near/164634235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html#164634235">(May 01 2019 at 16:01)</a>:</h4>
<p>I'm kind of chatting on here about possible solutions :)</p>



<a name="164634475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/caching%20cycles%20%2360010/near/164634475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html#164634475">(May 01 2019 at 16:04)</a>:</h4>
<p>anyway I mean the obvious thing is to do the usual algorithm for detecting SCCs, I think</p>



<a name="164634532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/caching%20cycles%20%2360010/near/164634532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html#164634532">(May 01 2019 at 16:05)</a>:</h4>
<p>basically I think we would not cache <em>anything</em> that depended on a cycle until we reach the "head" of the cycle in the stack, and then we'd cache everything at once (as appropriate)</p>



<a name="164635463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/caching%20cycles%20%2360010/near/164635463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html#164635463">(May 01 2019 at 16:19)</a>:</h4>
<p>implementing this though is gonna' be a bit annoying</p>



<a name="164635480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/caching%20cycles%20%2360010/near/164635480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/caching.20cycles.20.2360010.html#164635480">(May 01 2019 at 16:19)</a>:</h4>
<p>I'm also worrying a bit about the SLG solver in chalk-engine; want to be sure it doesn't fall into the same trap... I feel like it may.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>